home *** CD-ROM | disk | FTP | other *** search
/ Word Play Farm / Word Play Farm.iso / pc / movies / shared.dxr / 00537_Clue View Script.ls < prev    next >
Encoding:
Text File  |  1996-07-29  |  2.1 KB  |  99 lines

  1. on setupopen
  2.   global hex, HV, hexA, hexZ
  3.   puppetTempo(24)
  4.   set startnum to the number of cast "OpenHexFX"
  5.   preLoadCast(startnum, startnum + 7)
  6.   set hex to 4
  7.   set HV to 6
  8.   set hexA to the number of cast "hexA"
  9.   set hexZ to the number of cast "hexZ"
  10.   puppetSprite(1, 1)
  11.   repeat with t = HV to HV + 3
  12.     puppetSprite(t, 1)
  13.   end repeat
  14.   openHV()
  15.   openHex()
  16. end
  17.  
  18. on openHV
  19.   global HV, hex, screenCentreV, screenCentreH, t, B, L, R, L1, R1, T1, B1, L2, R2, T2, B2
  20.   set screenCentreV to 240
  21.   set screenCentreH to 320
  22.   set t to the top of sprite 1
  23.   set B to the bottom of sprite 1
  24.   set L to the left of sprite 1
  25.   set R to the right of sprite 1
  26.   set the locH of sprite 1 to 320
  27.   set the locV of sprite 1 to 240
  28.   set the height of sprite hex to B - t + 2
  29.   set the width of sprite hex to R - L + 2
  30.   set the locH of sprite hex to screenCentreH
  31.   set the locV of sprite hex to screenCentreV
  32.   if L < 5 then
  33.     set L2 to 15
  34.   else
  35.     set L2 to L
  36.   end if
  37.   set the locH of sprite HV to L2
  38.   if R > 625 then
  39.     set R2 to 625
  40.   else
  41.     set R2 to R
  42.   end if
  43.   set the locH of sprite (HV + 1) to R2
  44.   if t < 20 then
  45.     set T2 to 15
  46.   else
  47.     set T2 to t
  48.   end if
  49.   set the locV of sprite (HV + 2) to T2
  50.   if B > 465 then
  51.     set B2 to 465
  52.   else
  53.     set B2 to B
  54.   end if
  55.   set the locV of sprite (HV + 3) to B2
  56.   updateStage()
  57.   sndEfct()
  58. end
  59.  
  60. on closeHV
  61.   global HV, hex, screenCentreV, screenCentreH, t, B, L, R, midV, midH, H1, H2, H3, H4
  62.   set the locH of sprite HV to screenCentreH
  63.   set the locH of sprite (HV + 1) to screenCentreH
  64.   updateStage()
  65.   sndEfct()
  66.   set the locV of sprite (HV + 2) to screenCentreV
  67.   set the locV of sprite (HV + 3) to screenCentreV
  68.   updateStage()
  69.   sndEfct()
  70. end
  71.  
  72. on openHex
  73.   global hex, hexA, hexZ
  74.   puppetSprite(hex, 1)
  75.   repeat with x = hexA to hexZ
  76.     set the castNum of sprite hex to x
  77.     updateStage()
  78.     sndEfct()
  79.   end repeat
  80. end
  81.  
  82. on closeHex
  83.   global hex, hexA, hexZ
  84.   puppetSprite(hex, 1)
  85.   repeat with x = hexZ down to hexA
  86.     set the castNum of sprite hex to x
  87.     updateStage()
  88.     sndEfct()
  89.   end repeat
  90. end
  91.  
  92. on sndEfct
  93.   puppetSound("OpenHexFX")
  94.   updateStage()
  95.   repeat while soundBusy(1)
  96.     nothing()
  97.   end repeat
  98. end
  99.